#include <fstream>
#include <string>

long long gcd(long long a, long long b, long long & x, long long & y)
{
	if (a == 0)
	{
		x = 0; y = 1;
		return b;
	}

	long long x1, y1;
	long long d = gcd (b % a, a, x1, y1);

	x = y1 - (b / a) * x1;
	y = x1;

	return d;
}

int main()
{
	std::ifstream input("in.txt");
	std::ofstream output("out.txt");

	long long a, b, c;

	const std::string none = "<none>";

	while (input >> a >> b >> c) 
    {
		long long res;
		long long x, y;

		res = gcd(a, b, x, y);

		if (res == 0) 
		{
			if (c == 0) 
			{
				output << x * c << ' ' << y * c << '\n';
			} else
			{
				output << none << '\n';
			}
		}
		else if (c % res != 0)
		{
			output << none << '\n';
		} else
		{
			output << x * (c / res) << ' ' << y * (c / res) << '\n';
		}
    }

	return 0;
}